<extend name="Layout:layout" />
<block name="body_main">
    <div class="block box">
        <div class="blank"></div>
        <div id="ur_here">
            当前位置: <a href=".">首页</a> <code>&gt;</code> 购物流程 
        </div>
    </div>
    <div class="blank"></div>

    <div class="block table">






        <script type="text/javascript" src="js/user.js"></script>        <script type="text/javascript">
            var username_not_null = "请您输入用户名。";
            var username_invalid = "您输入了一个无效的用户名。";
            var password_not_null = "请您输入密码。";
            var email_not_null = "请您输入电子邮件。";
            var email_invalid = "您输入的电子邮件不正确。";
            var password_not_same = "您输入的密码和确认密码不一致。";
            var password_lt_six = "密码不能小于6个字符。";


            function checkLoginForm(frm) {
                if (Utils.isEmpty(frm.elements['username'].value)) {
                    alert(username_not_null);
                    return false;
                }

                if (Utils.isEmpty(frm.elements['password'].value)) {
                    alert(password_not_null);
                    return false;
                }

                return true;
            }

            function checkSignupForm(frm) {
                if (Utils.isEmpty(frm.elements['username'].value)) {
                    alert(username_not_null);
                    return false;
                }

                if (Utils.trim(frm.elements['username'].value).match(/^\s*$|^c:\\con\\con$|[%,\'\*\"\s\t\<\>\&\\]/))
                {
                    alert(username_invalid);
                    return false;
                }

                if (Utils.isEmpty(frm.elements['email'].value)) {
                    alert(email_not_null);
                    return false;
                }

                if (!Utils.isEmail(frm.elements['email'].value)) {
                    alert(email_invalid);
                    return false;
                }

                if (Utils.isEmpty(frm.elements['password'].value)) {
                    alert(password_not_null);
                    return false;
                }

                if (frm.elements['password'].value.length < 6) {
                    alert(password_lt_six);
                    return false;
                }

                if (frm.elements['password'].value != frm.elements['confirm_password'].value) {
                    alert(password_not_same);
                    return false;
                }
                return true;
            }

        </script>


        <div class="flowBox" style="border:none; border-top:1px solid #ddd">
            <table width="100%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
                <tr>
                    <td width="50%" valign="top" bgcolor="#ffffff">
                        <h6><span>用户登录：</span></h6>
                        <form action="flow.php?step=login" method="post" name="loginForm" id="loginForm" onsubmit="return checkLoginForm(this)">
                            <table width="90%" border="0" cellpadding="8" cellspacing="0" bgcolor="#B0D8FF" class="table">
                                <tr>
                                    <td bgcolor="#ffffff"><div align="right"><strong>用户名</strong></div></td>
                                    <td bgcolor="#ffffff"><input name="username" type="text" class="inputBg" id="username" /></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#ffffff"><div align="right"><strong>密码</strong></div></td>
                                    <td bgcolor="#ffffff"><input name="password" class="inputBg" type="password" /></td>
                                </tr>
                                <tr>
                                    <td colspan="2"  bgcolor="#ffffff"><input type="checkbox" value="1" name="remember" id="remember" /><label for="remember">请保存我这次的登录信息。</label></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#ffffff" colspan="2" align="center"><a href="user.php?act=qpassword_name" class="f6">密码问题找回密码</a>   <a href="user.php?act=get_password" class="f6">注册邮件找回密码</a></td>
                                </tr>


                                <tr>
                                    <td bgcolor="#ffffff" colspan="2"><div align="center">
                                            <input type="submit" class="bnt_blue" name="login" value="登录" />
                                            <input name="act" type="hidden" value="signin" />
                                        </div></td>
                                </tr>
                            </table>
                        </form>

                    </td>
                    <td valign="top" bgcolor="#ffffff">
                        <h6><span>用户注册：</span></h6>
                        <form action="flow.php?step=login" method="post" name="formUser" id="registerForm" onsubmit="return checkSignupForm(this)">
                            <table width="98%" border="0" cellpadding="8" cellspacing="0" bgcolor="#B0D8FF" class="table">
                                <tr>
                                    <td bgcolor="#ffffff" align="right" width="25%"><strong>用户名</strong></td>
                                    <td bgcolor="#ffffff"><input name="username" type="text" class="inputBg" id="username" onblur="is_registered(this.value);" /><br />
                                        <span id="username_notice" style="color:#FF0000"></span></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#ffffff" align="right"><strong>电子邮件地址</strong></td>
                                    <td bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email" onblur="checkEmail(this.value);" /><br />
                                        <span id="email_notice" style="color:#FF0000"></span></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#ffffff" align="right"><strong>密码</strong></td>
                                    <td bgcolor="#ffffff"><input name="password" class="inputBg" type="password" id="password1" onblur="check_password(this.value);" onkeyup="checkIntensity(this.value)" /><br />
                                        <span style="color:#FF0000" id="password_notice"></span></td>
                                </tr>
                                <tr>
                                    <td bgcolor="#ffffff" align="right"><strong>确认密码</strong></td>
                                    <td bgcolor="#ffffff"><input name="confirm_password" class="inputBg" type="password" id="confirm_password" onblur="check_conform_password(this.value);" /><br />
                                        <span style="color:#FF0000" id="conform_password_notice"></span></td>
                                </tr>
                                <tr>
                                    <td colspan="2" bgcolor="#ffffff" align="center">
                                        <input type="submit" name="Submit" class="bnt_blue_1" value="注册新用户" />
                                        <input name="act" type="hidden" value="signup" />
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </td>
                </tr>
            </table>
        </div>





    </div>

</block>